#  判断两个字符是否互为变位词

import sys
s1 = sys.argv[1]
s2 = sys.argv[2]

# map 字频统计
def isAnagrams(s1,s2):
	return wordCount(s1) == wordCount(s2) 
#  Counter字频统计
from collections import Counter
def isAnagrams2(s1,s2):
	return Counter(s1) == Counter(s2) 

def wordCount(s):
	mp = {}
	for i in s:
		mp[i]=mp.get(i,0)+1  
		#mp[i]+=1
	for k in mp.keys():
		# print(type(k))   	# 打印数据的类型
		# print(type(mp[k])) 
		print('%s -> %d'%(k,mp[k])) # print("{} -> {}".format(k, mp[k]))
	return mp
		


print(isAnagrams(s1,s2))

print(isAnagrams2(s1,s2))